package com.itheima.job.pojo.enums;

/**
 * @Author byZhao
 * @Modify 2021-11-17 0:57
 * @Description <p> </p>
 * <p> Talk is cheap . Show me the code! </p>
 */
public enum ResultCode {
    // 定义通用成功和失败的枚举
    SUCCESS(20000, "操作成功!"),
    FAIL(30000, "操作失败!"),

    // 业务枚举
    PARAM_INVALID(40000, "参数无效!"),
    USERNMAE_EXIST(50000, "用户名存在!"),
    SUCCESS_REGISTER(200001, "用户注册成功!"),

    USERNAME_NOT_EXIST(10001, "用户名不存在!"),
    PASSWORD_WRONG(10002, "用户密码错误!"),
    CODE_NOT_ACTIVATE(10003, "账号未激活!"),

    CODE_DISABLE(20001, "激活码失效!"),
    CODE_WRONG(20002, "非法激活码!"),

    // 可以增加.....
    ;
    private int code;
    private String value;

    private ResultCode(int code, String value) {
        this.code = code;
        this.value = value;
    }

    public int getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
